/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.pbv.azsg.dao;

import java.util.List;


import org.hibernate.SessionFactory;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.pbv.azsg.domain.FuelEntity;

/**
 *
 * @author b.prikhodko
 */
@Repository
public class FuelDAOImpl implements IFuelDAO {
    
    @Autowired
    protected SessionFactory sessionFactory;
    
    @Override
    public List<FuelEntity> getFuels(){        
        return (List<FuelEntity>) this.sessionFactory.getCurrentSession().createCriteria(FuelEntity.class).list();
    }
      
}
